package com.ruoyi.project.system.domain;


import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;

/**
 * 收费记录对象 siyu_charge
 */
@Data
public class SiyuCharge extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 扣费单号
     */
    private Integer id;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Integer userId;

    /**
     * 进件单号
     */
    @Excel(name = "进件单号")
    private Integer queryId;

    /**
     * 扣前余额
     */
    @Excel(name = "扣前余额")
    private BigDecimal beforeBalance;

    /**
     * 扣费额
     */
    @Excel(name = "扣费额")
    private BigDecimal costNum;

    /**
     * 扣后余额
     */
    @Excel(name = "扣后余额")
    private BigDecimal afterBalance;


    public SiyuCharge() {
    }

    public SiyuCharge(Integer userId, Integer queryId, String costResult, String authCode) {
        this.userId = userId;
        this.queryId = queryId;
    }

    public SiyuCharge(Integer userId, Integer queryId, BigDecimal beforeBalance,
                      BigDecimal costNum, BigDecimal afterBalance, String costResult) {
        this.userId = userId;
        this.queryId = queryId;
        this.beforeBalance = beforeBalance;
        this.costNum = costNum;
        this.afterBalance = afterBalance;

    }

    public SiyuCharge(Integer userId, Integer queryId, BigDecimal beforeBalance, BigDecimal costNum,
                      BigDecimal afterBalance, String costResult, String authCode) {
        this.userId = userId;
        this.queryId = queryId;
        this.beforeBalance = beforeBalance;
        this.costNum = costNum;
        this.afterBalance = afterBalance;

    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("queryId", getQueryId())
                .append("beforeBalance", getBeforeBalance())
                .append("costNum", getCostNum())
                .append("afterBalance", getAfterBalance())
                .append("createTime", getCreateTime())
                .toString();
    }
}
